Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix validation preparation issue when a protocol does not define a development set #1717

Conversation

clement-pages
Copy link
Collaborator

When using the following protocol, with no development subset defined :

EmbeddingsTaskOnlyMini:
    train:
        VoxCeleb.SpeakerVerification.VoxCelebMini: [train, ]
    development:
        # no development subset defined

I encountered this error:

Traceback (most recent call last):
  File "/gpfsdswork/projects/rech/bvr/uaf83xi/eend_2/joint/test_train.py", line 40, in <module>
    trainer.fit(model)
  File "/gpfsdswork/projects/rech/bvr/uaf83xi/micromamba/envs/pyannote/lib/python3.9/site-packages/pytorch_lightning/trainer/trainer.py", line 544, in fit
    call._call_and_handle_interrupt(
  File "/gpfsdswork/projects/rech/bvr/uaf83xi/micromamba/envs/pyannote/lib/python3.9/site-packages/pytorch_lightning/trainer/call.py", line 44, in _call_and_handle_interrupt
    return trainer_fn(*args, **kwargs)
  File "/gpfsdswork/projects/rech/bvr/uaf83xi/micromamba/envs/pyannote/lib/python3.9/site-packages/pytorch_lightning/trainer/trainer.py", line 580, in _fit_impl
    self._run(model, ckpt_path=ckpt_path)
  File "/gpfsdswork/projects/rech/bvr/uaf83xi/micromamba/envs/pyannote/lib/python3.9/site-packages/pytorch_lightning/trainer/trainer.py", line 941, in _run
    self._data_connector.prepare_data()
  File "/gpfsdswork/projects/rech/bvr/uaf83xi/micromamba/envs/pyannote/lib/python3.9/site-packages/pytorch_lightning/trainer/connectors/data_connector.py", line 100, in prepare_data
    call._call_lightning_module_hook(trainer, "prepare_data")
  File "/gpfsdswork/projects/rech/bvr/uaf83xi/micromamba/envs/pyannote/lib/python3.9/site-packages/pytorch_lightning/trainer/call.py", line 157, in _call_lightning_module_hook
    output = fn(*args, **kwargs)
  File "/gpfsdswork/projects/rech/bvr/uaf83xi/pyannote-audio/pyannote/audio/core/model.py", line 198, in prepare_data
    self.task.prepare_data()
  File "/gpfsdswork/projects/rech/bvr/uaf83xi/pyannote-audio/pyannote/audio/core/task.py", line 596, in prepare_data
    self.prepare_validation(prepared_data)
  File "/gpfsdswork/projects/rech/bvr/uaf83xi/pyannote-audio/pyannote/audio/tasks/segmentation/mixins.py", line 293, in prepare_validation
    get_dtype(max(v[0] for v in validation_chunks)),
ValueError: max() arg is an empty sequence

This PR fixes the issue.

@hbredin hbredin merged commit d327195 into pyannote:develop May 24, 2024
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants